Optimal. Leaf size=105 \[ -\frac{a^3 A \cot ^5(c+d x)}{5 d}-\frac{2 a^3 A \cot ^3(c+d x)}{3 d}+\frac{a^3 A \tanh ^{-1}(\cos (c+d x))}{4 d}-\frac{a^3 A \cot (c+d x) \csc ^3(c+d x)}{2 d}+\frac{a^3 A \cot (c+d x) \csc (c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.234037, antiderivative size = 105, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 6, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {2950, 2709, 3767, 8, 3768, 3770} \[ -\frac{a^3 A \cot ^5(c+d x)}{5 d}-\frac{2 a^3 A \cot ^3(c+d x)}{3 d}+\frac{a^3 A \tanh ^{-1}(\cos (c+d x))}{4 d}-\frac{a^3 A \cot (c+d x) \csc ^3(c+d x)}{2 d}+\frac{a^3 A \cot (c+d x) \csc (c+d x)}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2950
Rule 2709
Rule 3767
Rule 8
Rule 3768
Rule 3770
Rubi steps
\begin{align*} \int \csc ^6(c+d x) (a+a \sin (c+d x))^3 (A-A \sin (c+d x)) \, dx &=\left (a^3 A^3\right ) \int \frac{\cot ^6(c+d x)}{(A-A \sin (c+d x))^2} \, dx\\ &=\frac{a^3 \int \left (-A^4 \csc ^2(c+d x)-2 A^4 \csc ^3(c+d x)+2 A^4 \csc ^5(c+d x)+A^4 \csc ^6(c+d x)\right ) \, dx}{A^3}\\ &=-\left (\left (a^3 A\right ) \int \csc ^2(c+d x) \, dx\right )+\left (a^3 A\right ) \int \csc ^6(c+d x) \, dx-\left (2 a^3 A\right ) \int \csc ^3(c+d x) \, dx+\left (2 a^3 A\right ) \int \csc ^5(c+d x) \, dx\\ &=\frac{a^3 A \cot (c+d x) \csc (c+d x)}{d}-\frac{a^3 A \cot (c+d x) \csc ^3(c+d x)}{2 d}-\left (a^3 A\right ) \int \csc (c+d x) \, dx+\frac{1}{2} \left (3 a^3 A\right ) \int \csc ^3(c+d x) \, dx+\frac{\left (a^3 A\right ) \operatorname{Subst}(\int 1 \, dx,x,\cot (c+d x))}{d}-\frac{\left (a^3 A\right ) \operatorname{Subst}\left (\int \left (1+2 x^2+x^4\right ) \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac{a^3 A \tanh ^{-1}(\cos (c+d x))}{d}-\frac{2 a^3 A \cot ^3(c+d x)}{3 d}-\frac{a^3 A \cot ^5(c+d x)}{5 d}+\frac{a^3 A \cot (c+d x) \csc (c+d x)}{4 d}-\frac{a^3 A \cot (c+d x) \csc ^3(c+d x)}{2 d}+\frac{1}{4} \left (3 a^3 A\right ) \int \csc (c+d x) \, dx\\ &=\frac{a^3 A \tanh ^{-1}(\cos (c+d x))}{4 d}-\frac{2 a^3 A \cot ^3(c+d x)}{3 d}-\frac{a^3 A \cot ^5(c+d x)}{5 d}+\frac{a^3 A \cot (c+d x) \csc (c+d x)}{4 d}-\frac{a^3 A \cot (c+d x) \csc ^3(c+d x)}{2 d}\\ \end{align*}
Mathematica [B] time = 0.074181, size = 268, normalized size = 2.55 \[ a^3 A \left (-\frac{7 \tan \left (\frac{1}{2} (c+d x)\right )}{30 d}+\frac{7 \cot \left (\frac{1}{2} (c+d x)\right )}{30 d}-\frac{\csc ^4\left (\frac{1}{2} (c+d x)\right )}{32 d}+\frac{\csc ^2\left (\frac{1}{2} (c+d x)\right )}{16 d}+\frac{\sec ^4\left (\frac{1}{2} (c+d x)\right )}{32 d}-\frac{\sec ^2\left (\frac{1}{2} (c+d x)\right )}{16 d}-\frac{\log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )}{4 d}+\frac{\log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )}{4 d}-\frac{\cot \left (\frac{1}{2} (c+d x)\right ) \csc ^4\left (\frac{1}{2} (c+d x)\right )}{160 d}-\frac{19 \cot \left (\frac{1}{2} (c+d x)\right ) \csc ^2\left (\frac{1}{2} (c+d x)\right )}{480 d}+\frac{\tan \left (\frac{1}{2} (c+d x)\right ) \sec ^4\left (\frac{1}{2} (c+d x)\right )}{160 d}+\frac{19 \tan \left (\frac{1}{2} (c+d x)\right ) \sec ^2\left (\frac{1}{2} (c+d x)\right )}{480 d}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.06, size = 132, normalized size = 1.3 \begin{align*}{\frac{7\,{a}^{3}A\cot \left ( dx+c \right ) }{15\,d}}+{\frac{{a}^{3}A\cot \left ( dx+c \right ) \csc \left ( dx+c \right ) }{4\,d}}-{\frac{{a}^{3}A\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{4\,d}}-{\frac{{a}^{3}A\cot \left ( dx+c \right ) \left ( \csc \left ( dx+c \right ) \right ) ^{3}}{2\,d}}-{\frac{{a}^{3}A\cot \left ( dx+c \right ) \left ( \csc \left ( dx+c \right ) \right ) ^{4}}{5\,d}}-{\frac{4\,{a}^{3}A\cot \left ( dx+c \right ) \left ( \csc \left ( dx+c \right ) \right ) ^{2}}{15\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.994365, size = 236, normalized size = 2.25 \begin{align*} \frac{15 \, A a^{3}{\left (\frac{2 \,{\left (3 \, \cos \left (d x + c\right )^{3} - 5 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 60 \, A a^{3}{\left (\frac{2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + \frac{120 \, A a^{3}}{\tan \left (d x + c\right )} - \frac{8 \,{\left (15 \, \tan \left (d x + c\right )^{4} + 10 \, \tan \left (d x + c\right )^{2} + 3\right )} A a^{3}}{\tan \left (d x + c\right )^{5}}}{120 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.09352, size = 520, normalized size = 4.95 \begin{align*} \frac{56 \, A a^{3} \cos \left (d x + c\right )^{5} - 80 \, A a^{3} \cos \left (d x + c\right )^{3} + 15 \,{\left (A a^{3} \cos \left (d x + c\right )^{4} - 2 \, A a^{3} \cos \left (d x + c\right )^{2} + A a^{3}\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) \sin \left (d x + c\right ) - 15 \,{\left (A a^{3} \cos \left (d x + c\right )^{4} - 2 \, A a^{3} \cos \left (d x + c\right )^{2} + A a^{3}\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) \sin \left (d x + c\right ) - 30 \,{\left (A a^{3} \cos \left (d x + c\right )^{3} + A a^{3} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{120 \,{\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )} \sin \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.20684, size = 235, normalized size = 2.24 \begin{align*} \frac{3 \, A a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 15 \, A a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 25 \, A a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 120 \, A a^{3} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) - 90 \, A a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + \frac{274 \, A a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 90 \, A a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 25 \, A a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 15 \, A a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 3 \, A a^{3}}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5}}}{480 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]